package com.ruoyi.examination.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.examination.mapper.QuestionGroupRelationMapper;
import com.ruoyi.examination.domain.QuestionGroupRelation;
import com.ruoyi.examination.service.IQuestionGroupRelationService;

/**
 * 试题题组关系Service业务层处理
 * 
 * @author hcc
 * @date 2025-10-21
 */
@Service
public class QuestionGroupRelationServiceImpl implements IQuestionGroupRelationService 
{
    @Autowired
    private QuestionGroupRelationMapper questionGroupRelationMapper;

    /**
     * 查询试题题组关系
     * 
     * @param questionGroupId 试题题组关系主键
     * @return 试题题组关系
     */
    @Override
    public QuestionGroupRelation selectQuestionGroupRelationByQuestionGroupId(String questionGroupId)
    {
        return questionGroupRelationMapper.selectQuestionGroupRelationByQuestionGroupId(questionGroupId);
    }

    /**
     * 查询试题题组关系列表
     * 
     * @param questionGroupRelation 试题题组关系
     * @return 试题题组关系
     */
    @Override
    public List<QuestionGroupRelation> selectQuestionGroupRelationList(QuestionGroupRelation questionGroupRelation)
    {
        return questionGroupRelationMapper.selectQuestionGroupRelationList(questionGroupRelation);
    }

    /**
     * 新增试题题组关系
     * 
     * @param questionGroupRelation 试题题组关系
     * @return 结果
     */
    @Override
    public int insertQuestionGroupRelation(QuestionGroupRelation questionGroupRelation)
    {
        return questionGroupRelationMapper.insertQuestionGroupRelation(questionGroupRelation);
    }

    /**
     * 修改试题题组关系
     * 
     * @param questionGroupRelation 试题题组关系
     * @return 结果
     */
    @Override
    public int updateQuestionGroupRelation(QuestionGroupRelation questionGroupRelation)
    {
        return questionGroupRelationMapper.updateQuestionGroupRelation(questionGroupRelation);
    }

    /**
     * 批量删除试题题组关系
     * 
     * @param questionGroupIds 需要删除的试题题组关系主键
     * @return 结果
     */
    @Override
    public int deleteQuestionGroupRelationByQuestionGroupIds(String[] questionGroupIds)
    {
        return questionGroupRelationMapper.deleteQuestionGroupRelationByQuestionGroupIds(questionGroupIds);
    }

    /**
     * 删除试题题组关系信息
     * 
     * @param questionGroupId 试题题组关系主键
     * @return 结果
     */
    @Override
    public int deleteQuestionGroupRelationByQuestionGroupId(String questionGroupId)
    {
        return questionGroupRelationMapper.deleteQuestionGroupRelationByQuestionGroupId(questionGroupId);
    }
}
